package com.taxi.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ServletRequestAware;

import com.opensymphony.xwork2.ActionSupport;
import com.taxi.bean.UsuarioDTO;
import com.taxi.service.PaqueteBusinessDelegate;
import com.taxi.service.UsuarioService;

public class PuntoAction extends ActionSupport implements ServletRequestAware{
	
	private String punto;
	private HttpServletRequest request;
	private boolean success;
	private UsuarioService usuarioService = PaqueteBusinessDelegate.getUsuarioService();
	
	public void setServletRequest(HttpServletRequest request) {
		// TODO Auto-generated method stub
		this.request=request;
	}
	
	public String mostrarPunto(){
		System.out.println("Entro a punto");
		try {		

			punto = ""+usuarioService.obtenerPuntos("CLI0000002");
			System.out.println(punto);
			setSuccess(true);
			
		} catch (Exception e) {
			e.printStackTrace();
		}		
		return SUCCESS;
	}



	public String getPunto() {
		return punto;
	}

	public void setPunto(String punto) {
		this.punto = punto;
	}

	public HttpServletRequest getRequest() {
		return request;
	}

	public void setRequest(HttpServletRequest request) {
		this.request = request;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

}
